alter table jms_dm.dm_mng_customer_daliy_agent_summary_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_mng_customer_daliy_agent_summary_dt;

CREATE EXTERNAL TABLE if not exists jms_dm.dm_mng_customer_daliy_agent_summary_dt
(
    type            int COMMENT '1代表代理区汇总,2代表代理区项目汇总',
    date_time       string COMMENT '日期',
    agent_code      string COMMENT '代理区编码',
    agent_name      string COMMENT '代理区名称',
    project_name    string COMMENT '项目名称',
    way_total       int COMMENT '流入量',
    void_num        int COMMENT '取消量',
    need_soft_num   int COMMENT '应妥投量',
    actual_soft_num int COMMENT '实际妥投量',
    no_soft_num     int COMMENT '未妥投量',
    sign_num        int COMMENT '签收量',
    transport_num   int COMMENT '快件在途量',
    del_war_num     int COMMENT '派件中量',
    work_order_num  int COMMENT '客诉量',
    arbitration_num int COMMENT '丢失量',
    express_num     int COMMENT '破损量',
    7d_update_num   int COMMENT '轨迹断更量'
)
    COMMENT '客服日报代理区-代理区汇总'
    PARTITIONED BY (
        dt string COMMENT '中心扫描日期')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_mng_customer_daliy_agent_summary_dt'
;

